package o2o.postman.model;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.experimental.Accessors;
import org.springframework.core.annotation.AliasFor;
import org.springframework.validation.annotation.Validated;

import javax.persistence.Table;

/**
 * 城市配送员
 */
@Data
@Accessors(chain = true)
@TableName("city_postman")
public class CityPostman {
    @TableId
    private Long id;
    private Integer type;//类型 (POSTMAN_TYPE) 1. 普通配送员 2. 工人 3.提货点 4.货运司机  6.二级骑手
    private Long shopId;//店铺Id
    private String city;//所属市
    private String cityEN;//所属市（英文）
    private String username;//用户账号
    private String province;//所属省
    private String county;//所属区县
    private String region;//所属区域（商圈）
    private Integer isVerify;//是否已认证  0未认证  1已认证 2认证中
    private Long verifyTime;//认证时间
    private Long verifyEndTime;//认证有效日期
    private int delFlag;// 是否已删除(0未删除,1已删除)
    private String createUser;// 创建者
    private Long createTime;// 创建日期 141231212423423时间戳毫秒级标识
    private String updateUser;// 最后更新着
    private int isWork;//是否工作状态，1工作，0不工作
    private int isRemind;//是否开启配送提箱（0不开启，1开启）
    private int remindTime;//提前多长时间提醒(分钟)
    private Integer isLock;//   启用状态  0启用 1停用
    private Long applyTime;  //  申请时间
    private Double score;//评分
    private Double star;//星级
    private Integer level;//等级
    private Double moneyRate;//分成比例
    private String businessUsername;//业务员账号
    private String devInfo; // 骑手设备信息
    private String onlineTimeStr; // 骑手在线信息
    private String postman_name; //骑手姓名(新)
    private Long honeycomb_id; // 蜂窝主键
    private String bank_name; // 银行名称
    private String account_name; // 账户名称
    private String emergency_contact_name; // 紧急联系人名称
    private String emergency_contact_phone; // 紧急联系人号码
    private String bank_account; //银行账号
    private Long supplier_id; //供应商
    private Integer postman_type; //骑手类型

    public CityPostman() {
    }

    public CityPostman(String username, String province, String city, String county, String region, String auth, String createUser, Long createTime) {
        this.username = username;
        this.province = province;
        this.city = city;
        this.county = county;
        this.region = region;
        this.createUser = createUser;
        this.createTime = createTime;
        this.delFlag = 0;
        this.isWork = 1;
        this.remindTime = 30;
    }

    public CityPostman(String username, Integer type, String province, String city, String county, String region, String auth, String createUser, Long createTime) {
        this.username = username;
        this.type = type;
        this.province = province;
        this.city = city;
        this.county = county;
        this.region = region;
        this.createUser = createUser;
        this.createTime = createTime;
        this.delFlag = 0;
        this.isWork = 1;
        this.remindTime = 30;
    }
}
